<#macro index title extraCss extraJs bodyContent loginPage icon checkSession=true>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <#if icon??><link rel="shortcut icon" href="${icon}" /></#if>
		<title>${title}</title>
		<#include "/magicsoft/macro/includeStylesheet.ftl" />
		${extraCss}
	</head>
	<body class="easyui-layout" fit="true">
		<input type="hidden" id="___sysversion" value="${model.systemVersion}" />
			<#if model.softdogEnable>
				<object id="AuthIE" name="AuthIE"  width="0px" height="0px"  style="position: absolute;"
					codebase="DogAuth.CAB#version=2,3,1,58083"
					classid="CLSID:05C384B0-F45D-46DB-9055-C72DC76176E3">
				</object>
			</#if>
	
		<#include "/magicsoft/macro/includeJavascript.ftl" />
		${extraJs}
		${bodyContent}
		<input type="hidden" id="_localeIndex" value="${model.localeIndex}" />
		<input type="hidden" id="_softdogAuthCode" name="softdogAuthCode" value="${model.softdogAuthcode}" />
		<#if model.softdogEnable>
		<script type="text/javascript" src="${model.contextPath}/magicsoft/softdog/softdog.js"></script>
		</#if>
		<script>
		magicsoft.defaultDateFormat = '${model.defaultDateFormat}';
		
		var $$sessionExpireUrl = '${loginPage}?showExpireMsg=true'
		window._doLogout = function() {
			magicsoft.ajax({
				method: 'POST',
				url: '${model.basePath}/magicsoft/common/accountcenter/logout',
				success: function() {
					window.location.href = '${loginPage}';
				}
			});
		}
		
		function logout() {
			magicsoft.showConfirm("${model.getBundleString('jersey','index.logoutinfo')}", function($noty) {
				$noty.close();
				_doLogout();
			})
			return false;
		}
		
		function changePassword() {
			magicsoft.openDialog({
				title: "${model.getBundleString('jersey','index.changepassworddialogtitile')}",
				href: magicsoft.basePath + '/magicsoft/common/accountcenter/passwordmodification',
				style: 'width:500px;height:245px;'
			});
			return false;
		}
		function about() {
			magicsoft.openDialog({
				title: "${model.getBundleString('jersey','index.aboutdialogtitle')}",
				href: magicsoft.basePath + '/about',
				style: 'width:600px;height:300px;'
			});
			return false;
		}
		</script>
		<#if checkSession>
			<@sessionExpireTransfer />
		</#if>
	</body>
</html>
</#macro>